package org.cqust.backend.repository;

import org.cqust.backend.dto.response.data.ImageSummaryDTO;
import org.cqust.backend.entity.ImageData;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;
import java.util.Optional;

public interface ImageDataRepository extends JpaRepository<ImageData, Long> {

    @Query("SELECT new org.cqust.backend.dto.response.data.ImageSummaryDTO(i.id ,i.description) from ImageData i")
    List<ImageSummaryDTO> findAllDescriptionAndId();
}
